<?php
/**
 * Controller that displays a static page stored as a HTML file
 */
class Controller_Page extends DRY\Application\Controller_base
{
	public function Execute()
	{
		// $this->_route contains the data that was analysed from the URL by the Application module which loaded this controller

		switch($this->_route[0]) {
			// This is the "home" route
			case 'home':
				$page = 'homepage.html';
				break;
			case 'myroute':
				$page = implode('_', $this->_route['page']).'.html';
				break;
		}

		readfile(APP_PATH.'/application/pages/'.$page);
	}
}